﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：ModuleInfo.cs
// 功能描述：TongTongMall
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace TongTongMall.Modules
{
    /// <summary>
    /// basemodule的关联信息
    /// </summary>
    internal class ModuleInfo
    {
        public Assembly Assembly { get; private set; }

        public Type Type { get; private set; }

        public BaseModule Instance { get; private set; }

        public List<ModuleInfo> Dependencies { get; private set; }

        public ModuleInfo(BaseModule instance)
        {
            Dependencies = new List<ModuleInfo>();
            Type = instance.GetType();
            Instance = instance;
            Assembly = Type.Assembly;
        }

        public override string ToString()
        {
            return string.Format("{0}", Type.AssemblyQualifiedName);
        }
    }
}
